package net.koodar.forge.system.user.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import net.koodar.forge.mybatis.doman.BaseEntity;


/**
 * 用户表
 *
 * @author liyc
 */
@Data
@TableName("sys_user")
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class User extends BaseEntity<User> {

	@TableId(value = "id", type = IdType.AUTO)
	private Long id;

	/**
	 * 账号
	 */
	@TableField("username")
	private String username;

	/**
	 * 用户名
	 */
	@TableField("nickname")
	private String nickname;

	/**
	 * 密码
	 */
	@TableField("password")
	private String password;

	/**
	 * 用户邮箱
	 */
	@TableField("email")
	private String email;

	/**
	 * 用户头像
	 */
	@TableField("avatar")
	private String avatar;


	/**
	 * 用户描述
	 */
	@TableField("description")
	private String description;


	/**
	 * 部门id
	 */
	@TableField("department_id")
	private Long departmentId;

	/**
	 * 状态: 1.正常 0.禁用
	 */
	@TableField("status")
	private Integer status = 1;

	/**
	 * deleted字段请在数据库中 设置为tinyInt   并且非null   默认值为0
	 */
	@Schema(description = "删除标志（0代表存在 1代表删除）")
	@TableField("deleted_flag")
	@TableLogic
	private Integer deletedFlag = 0;

	/**
	 * 是否为超级管理员: 0 不是，1是
	 */
	@TableField("administrator_flag")
	private Boolean administratorFlag = false;

}
